FPC = fpc
PARAMS = -MObjFPC -Sc -Sh -Si -Sm -St
PATHS = -FU../Temp -FuCore -FuLib -FuLib/PascalScript
DOC_PARAMS = -T CheLive -O html -L ru.utf8 --css Docs/style.css --use-tipue-search --auto-link --introduction Docs/intro.htm -D FPC -D PASDOC
DOC_FILES = Core/CoreTypes.pas Core/CoreMath.pas Core/CoreConsole.pas Core/Core2D.pas Core/CoreCamera.pas Core/CoreOpenGL.pas Core/CoreWindow.pas Core/CoreInput.pas Core/CoreTimer.pas Core/CoreShader.pas Core/CoreTexture.pas Core/CoreFBO.pas

all:
	$(FPC) $(PARAMS) $(PATHS) Core/Samples/CoreTest.pas -o../Bin/CoreTest
	strip $(TARGET) --strip-unneeded -R .comment -R .note

win32:
	$(FPC) $(PARAMS) $(PATHS) -WG Core/Samples/CoreTest.pas -o../Bin/CoreTest.exe
#	$(FPC) $(PARAMS) $(PATHS) -WG Core/Samples/CoreTestBlur.pas -o../Bin/CoreTestBlur.exe
#	$(FPC) $(PARAMS) $(PATHS) -WG Core/Samples/CoreTestShadowMaps.pas -o../Bin/CoreTestShadowMaps.exe

doc:
	pasdoc $(DOC_FILES) $(DOC_PARAMS) -D WIN32 -E ../Docs/Core/Win32
	pasdoc $(DOC_FILES) $(DOC_PARAMS) -D LINUX -E ../Docs/Core/Linux
